package Draw;

import java.util.Vector;

public class MyTank extends Tank{
    Vector<fright> Myfight=new Vector<>();
    fright fright1=null;
    public MyTank(int x, int y) {
        super(x, y);
    }
   public void shot(){
        switch (getDirection()){
            case 0:
                fright1=new fright(getX()+20,getY(),0);
                break;
            case 1:
                fright1=new fright(getX()+60,getY()+20,1);
                break;
            case 2:
                fright1=new fright(getX()+20,getY()+60,2);
                break;
            case 3:
                fright1=new fright(getX()-20,getY()+20,3);
                break;
        }
        Myfight.add(fright1);
        new Thread(fright1).start();
   }

}
